<template>
  <div class="weui-media-box weui-media-box_appmsg btnone">
    <div class="weui-media-box__hd">
      <img class="weui-media-box__thumb" :src="iconsrc" :srcset="iconsrcset" alt="">
    </div>
    <div class="weui-media-box__bd">
      <h4 class="weui-media-box__title fullL">
        <span class="partB">{{stattext}}</span>
        <span class="ordertime partS">{{otime}}</span>
      </h4>
      <p class="weui-media-box__desc lhp48">单号：{{onum}}</p>
    </div>
  </div>
</template>

<script>
export default {
  name: 'StatCard',
  props: ['ostat', 'otime', 'onum'],
  data () {
    return {
      iconsrc: '',
      iconsrcset: '',
      stattext: ''
    }
  },
  mounted () {
    this.getStatText()
  },
  methods: {
    getStatText () {
      var statInfo = this.cm.getStatInfo(this.ostat)
      this.iconsrc = statInfo.iconsrc
      this.iconsrcset = statInfo.iconsrcset
      this.stattext = statInfo.text
    }
  }
}
</script>

<style lang="stylus" scoped>
</style>
